home *** CD-ROM | disk | FTP | other *** search
- Path: GIMLI.genias.de!usenet
- From: Andreas Haas <andreas>
- Newsgroups: comp.lang.c
- Subject: Re: E-mail from within a Program
- Date: 1 Feb 1996 15:49:03 GMT
- Organization: GENIAS Software GmbH
- Message-ID: <4eqndf$gj0@GIMLI.genias.de>
- References: <4eoepe$kov@serveru1.naic.wpafb.af.mil>
- NNTP-Posting-Host: thorin.genias.de
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.2 sun4c)
- X-URL: news:4eoepe$kov@serveru1.naic.wpafb.af.mil
-
- Hello Keith,
-
- your problem is that the "<" must be evaluated by a shell.
- So start a shell, that starts your command line arguments
- including the file redirection.
-
- - first build up your argv[] for the execlp()
- - fork() a new process
- - execlp() your argv[]
- - I think you will have to call wait3() to
- wait for the finish of your child process
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Andreas Haas
- GENIAS Software GmbH | Email: andreas@genias.de
- Erzgebirgstr. 2 B | Tel.: ++49 +9401 9200-0/41
- D-93073 Neutraubling/Germany | FAX: ++49 +9401 9200-92
- http://www.genias.de/ |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-